package com.cyb.myfriend.constant;

import lombok.Data;

import java.io.Serializable;

/**
 * 通用返回
 *
 * @author cyb
 * @date 2024/08/11 18:09
 **/
@Data
public class BaseResponse<T> implements Serializable{

    private int code;

    private String message;

    private T data;

    public BaseResponse(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public BaseResponse(int code, String message) {
        this(code, message, null);
    }

    public BaseResponse(int code, T data) {
        this(code, "", data);
    }

    public BaseResponse(int code) {
        this(code, "", null);
    }

}

